package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 代金券配置对象 vouchers
 *
 * @author ruoyi
 * @date 2025-05-23
 */
public class Vouchers extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 代金券唯一标识符（主键，自增） */
    private Long id;

    /** 代金券名称（如"全场通用券"） */
    @Excel(name = "代金券名称")
    private String voucherName;

    /** 代金券编号（如"VOUCH-202311-001"） */
    @Excel(name = "代金券编号")
    private String voucherCode;

    /** 代金券总数量（NULL表示不限制数量） */
    @Excel(name = "代金券总数量", readConverterExp = "N=ULL表示不限制数量")
    private Integer totalQuantity;

    /** 剩余可用数量 */
    @Excel(name = "剩余可用数量")
    private Integer remainingQuantity;

    /** 代金券面额（如100.00元） */
    @Excel(name = "代金券面额", readConverterExp = "如=100.00元")
    private BigDecimal faceValue;

    /** 代金券类型（枚举值） */
    @Excel(name = "代金券类型", readConverterExp = "枚=举值")
    private String discountType;

    /** 使用门槛（如满200元可用，无门槛券时为0） */
    @Excel(name = "使用门槛", readConverterExp = "如=满200元可用，无门槛券时为0")
    private BigDecimal minimumSpend;

    /** 折扣率（如8折时为0.8，非折扣券时为NULL） */
    @Excel(name = "折扣率", readConverterExp = "如=8折时为0.8，非折扣券时为NULL")
    private BigDecimal discountRate;

    /** 代金券有效期开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "代金券有效期开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date validStartTime;

    /** 代金券有效期结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "代金券有效期结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date validEndTime;

    /** 代金券可用范围（枚举值，支持多选逻辑需通过业务代码控制） */
    @Excel(name = "代金券可用范围", readConverterExp = "枚=举值，支持多选逻辑需通过业务代码控制")
    private String applicableScope;

    /** 是否参与员工服务计费（1=是，0=否） */
    @Excel(name = "是否参与员工服务计费", readConverterExp = "1==是，0=否")
    private Integer includeEmployeeService;

    /** 是否参与设备服务计费（1=是，0=否） */
    @Excel(name = "是否参与设备服务计费", readConverterExp = "1==是，0=否")
    private Integer includeEquipmentService;

    /** 适用商品范围（JSON数组格式，存储商品ID或分类ID） */
    @Excel(name = "适用商品范围", readConverterExp = "J=SON数组格式，存储商品ID或分类ID")
    private String applicableProducts;

    /** 适用商品分类（JSON数组格式，存储分类ID） */
    @Excel(name = "适用商品分类", readConverterExp = "J=SON数组格式，存储分类ID")
    private String applicableCategories;

    /** 代金券状态 */
    @Excel(name = "代金券状态")
    private String status;

    /** 代金券描述（如使用说明） */
    @Excel(name = "代金券描述", readConverterExp = "如=使用说明")
    private String description;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setVoucherName(String voucherName)
    {
        this.voucherName = voucherName;
    }

    public String getVoucherName()
    {
        return voucherName;
    }

    public void setVoucherCode(String voucherCode)
    {
        this.voucherCode = voucherCode;
    }

    public String getVoucherCode()
    {
        return voucherCode;
    }

    public void setTotalQuantity(Integer totalQuantity)
    {
        this.totalQuantity = totalQuantity;
    }

    public Integer getTotalQuantity()
    {
        return totalQuantity;
    }

    public void setRemainingQuantity(Integer remainingQuantity)
    {
        this.remainingQuantity = remainingQuantity;
    }

    public Integer getRemainingQuantity()
    {
        return remainingQuantity;
    }

    public void setFaceValue(BigDecimal faceValue)
    {
        this.faceValue = faceValue;
    }

    public BigDecimal getFaceValue()
    {
        return faceValue;
    }

    public void setDiscountType(String discountType)
    {
        this.discountType = discountType;
    }

    public String getDiscountType()
    {
        return discountType;
    }

    public void setMinimumSpend(BigDecimal minimumSpend)
    {
        this.minimumSpend = minimumSpend;
    }

    public BigDecimal getMinimumSpend()
    {
        return minimumSpend;
    }

    public void setDiscountRate(BigDecimal discountRate)
    {
        this.discountRate = discountRate;
    }

    public BigDecimal getDiscountRate()
    {
        return discountRate;
    }

    public void setValidStartTime(Date validStartTime)
    {
        this.validStartTime = validStartTime;
    }

    public Date getValidStartTime()
    {
        return validStartTime;
    }

    public void setValidEndTime(Date validEndTime)
    {
        this.validEndTime = validEndTime;
    }

    public Date getValidEndTime()
    {
        return validEndTime;
    }

    public void setApplicableScope(String applicableScope)
    {
        this.applicableScope = applicableScope;
    }

    public String getApplicableScope()
    {
        return applicableScope;
    }

    public void setIncludeEmployeeService(Integer includeEmployeeService)
    {
        this.includeEmployeeService = includeEmployeeService;
    }

    public Integer getIncludeEmployeeService()
    {
        return includeEmployeeService;
    }

    public void setIncludeEquipmentService(Integer includeEquipmentService)
    {
        this.includeEquipmentService = includeEquipmentService;
    }

    public Integer getIncludeEquipmentService()
    {
        return includeEquipmentService;
    }

    public void setApplicableProducts(String applicableProducts)
    {
        this.applicableProducts = applicableProducts;
    }

    public String getApplicableProducts()
    {
        return applicableProducts;
    }

    public void setApplicableCategories(String applicableCategories)
    {
        this.applicableCategories = applicableCategories;
    }

    public String getApplicableCategories()
    {
        return applicableCategories;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("voucherName", getVoucherName())
                .append("voucherCode", getVoucherCode())
                .append("totalQuantity", getTotalQuantity())
                .append("remainingQuantity", getRemainingQuantity())
                .append("faceValue", getFaceValue())
                .append("discountType", getDiscountType())
                .append("minimumSpend", getMinimumSpend())
                .append("discountRate", getDiscountRate())
                .append("validStartTime", getValidStartTime())
                .append("validEndTime", getValidEndTime())
                .append("applicableScope", getApplicableScope())
                .append("includeEmployeeService", getIncludeEmployeeService())
                .append("includeEquipmentService", getIncludeEquipmentService())
                .append("applicableProducts", getApplicableProducts())
                .append("applicableCategories", getApplicableCategories())
                .append("status", getStatus())
                .append("description", getDescription())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("phone", getPhone())
                .toString();
    }
}
